package com.ytjj.qmyx.supplychain.common.enums;

/**
 * @Description 库存冻结流水状态枚举类
 * @ClassName ProductCategoryStatusEnums
 * 
 * 
 * @Version 1.0
 **/
public enum StockFrozenRecordStatusEnums {
    /**
     * 状态 1-冻结中 2-已扣库存 3-退还库存
     */
    FROZEN_ING(1, "冻结中"),
    FROZEN_END(2, "已扣库存"),
    FROZEN_REBACK(3, "退还库存"),
    FROZEN_OBSOLETE(4, "冻结作废")//超时未支付或取消支付
    ;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 状态描述
     */
    private String statusDesc;

    StockFrozenRecordStatusEnums(Integer status, String statusDesc) {
        this.status = status;
        this.statusDesc = statusDesc;
    }

    public Integer getStatus() {
        return status;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public static String getStatusDesc(Integer status) {
        StockFrozenRecordStatusEnums[] values = StockFrozenRecordStatusEnums.values();
        for (StockFrozenRecordStatusEnums value : values) {
            if(value.status.equals(status)) {
                return value.statusDesc;
            }
        }
        return null;
    }
}
